package redora.configuration.rdo.gwt.mvp.service;

import com.google.gwt.json.client.JSONObject;
import redora.client.mvp.ClientFactory;

import redora.configuration.rdo.gwt.mvp.service.base.RedoraTrashServiceBase;
import redora.configuration.rdo.gwt.mvp.util.ClientFactoryImpl;

/**
* Service object for RedoraTrash that will do the communication with the server.
* Implemented as singleton to allow caching of objects on the client side.<br>
* Redora has generated the standard service methods in {@link RedoraTrashServiceBase},
* you can add your custom methods here.
*
* @author Redora (www.redora.net)
*/
public class RedoraTrashService extends RedoraTrashServiceBase {

    //As singleton: allows to cache result sets and pojos
    private static RedoraTrashService instance;
    private RedoraTrashService(ClientFactory clientFactory) {
        super(clientFactory);
    }
    public static synchronized RedoraTrashService getInstance() {
        if (instance == null)
            instance = new RedoraTrashService(new ClientFactoryImpl());
        return instance;
    }

    @Override
    public int finderStepSize() {
        return 50;
    }

    @Override
    public String getAuthInfo() {
        return "";
    }

    @Override
    public boolean customResponse(int status, JSONObject responseJSON) {
        return true;
    }
}